FROM php:7.4.33-fpm as php
RUN apt-get update && apt-get install -y \
    libfreetype6-dev \
    libjpeg62-turbo-dev \
    libpng-dev \
		libwebp-dev \
		supervisor \
    libonig-dev \
		cron\
    && docker-php-ext-install -j$(nproc) iconv \
    && docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/ --with-webp=/usr/include/ \
    && docker-php-ext-install -j$(nproc) gd \
    && docker-php-ext-install pdo_mysql \
    && docker-php-ext-install mbstring \
	&& docker-php-ext-install exif
	
RUN pecl install redis-4.3.0 \
	&& docker-php-ext-enable redis